//
//  NYLoginButton.m
//  BS
//
//  Created by neal on 15/8/16.
//  Copyright (c) 2015年 Neal. All rights reserved.
//

#import "NYLoginButton.h"

@implementation NYLoginButton
- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setup];
    }
    return self;
}
- (void)awakeFromNib
{
    [self setup];
}
- (void)setup
{
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
 
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imageView.y = 0;
    self.imageView.centerX = self.width * 0.5;
    
    self.titleLabel.x = 0;
    self.titleLabel.y = self.imageView.height;
    self.titleLabel.width = self.width;
    self.titleLabel.height = self.height - self.imageView.height;
}

@end
